package com.apex.crm.dao;

import com.apex.crm.base.BaseMapper;
import com.apex.crm.base.BaseQuery;
import com.apex.crm.vo.Role;
import org.springframework.dao.DataAccessException;

import java.util.List;
import java.util.Map;

public interface RoleMapper extends BaseMapper<Role,Integer> {
    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    //int insertSelective(Role record);

    Role selectByPrimaryKey(Integer id);

    //int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    //查找全部角色
    public List<Map<String,Object>> queryAllRoles(Integer userId);

    //多条件查询
    public List<Role> selectByParams(BaseQuery baseQuery) throws DataAccessException;


    Role selectByRoleName(String roleName);

    int deleteById(Integer roleId);
}